package cn.kwq.project_manger.pojo.dto;

import cn.kwq.project_manger.pojo.Project;
import cn.kwq.project_manger.pojo.Team;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "插入或更改队伍信息")
public class AddTeamDto {



    @ApiModelProperty("队伍id(更新信息时候传)")
    private Long teamId;


    /**
     * 队伍名字
     */
    @ApiModelProperty("队伍名字")
    private String teamName;

    /**
     * 总共人数
     */
    @ApiModelProperty("总共人数")
    private Integer teamNum;

    /**
     * 队伍情况
     */
    @ApiModelProperty("队伍情况")
    private String situation;



    /**
     * 队伍目标
     */
    @ApiModelProperty("队伍目标")
    private String goal;

    /**
     * 招收对象
     */
    @ApiModelProperty("招收对象")
    private String recruit;

    /**
     * 类型 0为组织 1个人
     */
    @ApiModelProperty("类型 0为组织 1个人")
    private Integer type;

    /**
     * 联系方式
     */
    @ApiModelProperty("联系方式")
    private String connect;

    /**
     * 招收对象需求
     */
    @ApiModelProperty("招收对象需求")
    private String recruitNeed;

    @ApiModelProperty("队伍类型（1比赛，2项目，3自由, 4非平台比赛，5非平台项目）")
    private Integer teamType;

    @ApiModelProperty("项目或者比赛名字")
    private String teamProjectName;

    @ApiModelProperty("无用")
    private String groupType;

    @ApiModelProperty(value = "自定义标签（str集合）")
    private List<String> tags;



    public Team getTeam(){
        return Team.builder()
                .teamId(this.teamId)
                .teamName(this.teamName)
                .teamNum(this.teamNum)
                .situation(this.situation)
                .goal(this.goal)
                .recruit(this.recruit)
                .type(this.type)
                .connect(this.connect)
                .recruitNeed(this.recruitNeed)
                .groupType(this.groupType)
                .teamType(this.teamType)
                .teamProjectName(this.teamProjectName)
                .status(null)
                .build();
    }
}
